xen.git
19 years ago[LIBXC] Python error extraction tweak.
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:46:07 +0000 (11:46 +0000)]
[LIBXC] Python error extraction tweak.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoMerge
Alastair Tse [Thu, 7 Dec 2006 11:45:00 +0000 (11:45 +0000)]
Merge

19 years agoMerge
Alastair Tse [Thu, 7 Dec 2006 11:44:05 +0000 (11:44 +0000)]
Merge

19 years agoRemove unused KEXEC_RANGE_VA_XEN.
Ian Campbell [Thu, 7 Dec 2006 11:43:19 +0000 (11:43 +0000)]
Remove unused KEXEC_RANGE_VA_XEN.

KEXEC_RANGE_VA_XEN is currently unused and there is no point in exporting it.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
---

 Applies to xen-unstable-12756

 xen/common/kexec.c         |   13 +++----------
 xen/include/public/kexec.h |    3 +--
 2 files changed, 4 insertions(+), 12 deletions(-)

19 years ago[XEND] Fix configureBootloader to work with HTTP/SEXP.
Alastair Tse [Thu, 7 Dec 2006 11:41:38 +0000 (11:41 +0000)]
[XEND] Fix configureBootloader to work with HTTP/SEXP.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
19 years ago[LIBXC] Add an error reporting API to the libxc library.
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:36:26 +0000 (11:36 +0000)]
[LIBXC] Add an error reporting API to the libxc library.

 - An 'xc_error' struct is used to pass around error
   details. Currently contains two members 'code' an enumeration of
   error types, and 'message' a free text description of the specific
   problem.

 - The xc_get_last_error() method returns a const pointer to the
   internal instance of this struct manged by libxc. By returning a
   const pointer we can add extra members to the end of the struct at
   any time without worrying about ABI of callers. This will let us
   provide more fine-grained info if needed in the future.

 - The xc_error instance is statically defined inside libxc and marked
   __thread. This ensures that errors are recorded per-thread, and
   that when dealing with errors we never need to call malloc - all
   storage needed is statically allocated.

 - The xc_clear_last_error() method resets any currently recorded
   error details

 - The xc_error_code_to_desc() method converts the integer error code
   into a generic user facing messsage. eg "Invalid kernel". Together
   with the 'message' field from xc_error, this provides the user
   visible feedback. eg "Invalid kernel: Non PAE-kernel on PAE host."

 - A callback can be registered with xc_set_error_handler to receive
   notification whenever an error is recorded, rather than querying
   for error details after the fact with xc_get_last_error

 - If built with -DDEBUG set, a default error handler will be
   registered which calls fprintf(stderr), thus maintaining current
   behaviour of logging errors to stderr during developer builds.

 - The python binding for libxc is updated to use xc_get_last_error
   to pull out error details whenever appropriate, instead of
   returning info based on 'errno'

 - The xc_set_error method is private to libxc internals, and is used
   for setting error details

 - The ERROR and PERROR macros have been updated to call xc_set_error
   automatically specifying XC_INTERNAL_ERROR as the error code. This
   gives a generic error report for all current failure points

 - Some uses of the ERROR macro have been replaced with explicit
   calls to xc_set_error to enable finer grained error reporting. In
   particular the code dealing with invalid kernel types uses this
   to report about PAE/architecture/wordsize mismatches

The patch has been tested by calling xm create against a varietry of
config files defining invalid kernels of various kinds. It has also
been tested with libvirt talking to xend. In both cases the error
messages were propagated all the way back up the stack.

There is only one place where I need to do further work. The suspend
& restore APIs in Xend invoke external helper programs rather than
calling libxc directly. This means that error details are essentially
lost. Since there is already code in XenD which scans STDERR from
these programs I will investigate adapting this to extract actual
error messages from these helpers.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
19 years ago[XEN] Make multiboot-related code more readable.
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:22:26 +0000 (11:22 +0000)]
[XEN] Make multiboot-related code more readable.
Tested on i386 and x86_64 with GRUB and PXELINUX bootmanagers.

From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoVMXAssist cleanups
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:18:38 +0000 (11:18 +0000)]
VMXAssist cleanups

Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[VTPM][HVM] Transmit the locality in which the command was sent in the
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:17:28 +0000 (11:17 +0000)]
[VTPM][HVM] Transmit the locality in which the command was sent in the
highest 3 bits of the 4 bytes prepended to each packet.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years ago[HVM] Fix reboot failure when configured 'cdrom', i.e. bug 832.
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:16:17 +0000 (11:16 +0000)]
[HVM] Fix reboot failure when configured 'cdrom', i.e. bug 832.
Signed-off-by : Xinmei Huang <xinmei.huang@intel.com>

19 years agomerge
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:14:21 +0000 (11:14 +0000)]
merge

19 years ago[HVM] qemu: Add guest address-space mapping cache.
kfraser@localhost.localdomain [Thu, 7 Dec 2006 11:12:52 +0000 (11:12 +0000)]
[HVM] qemu: Add guest address-space mapping cache.

On IA32 host or IA32 PAE host, at present, generally, we can't create
an HVM guest with more than 2G memory, because generally it's almost
impossible for Qemu to find a large enough and consecutive virtual
address space to map an HVM guest's whole physical address space.
The attached patch fixes this issue using dynamic mapping based on
little blocks of memory.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEND] Update vcpu_avail when parsing configuration.
Alastair Tse [Thu, 7 Dec 2006 11:12:05 +0000 (11:12 +0000)]
[XEND] Update vcpu_avail when parsing configuration.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix reboot for HVM domains if cdrom is empty.
Alastair Tse [Thu, 7 Dec 2006 10:54:43 +0000 (10:54 +0000)]
[XEND] Fix reboot for HVM domains if cdrom is empty.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years agoAdded VM.set_VCPUs_features_force_on, VM.set_VCPUs_features_force_off,
Ewan Mellor [Wed, 6 Dec 2006 16:33:48 +0000 (16:33 +0000)]
Added VM.set_VCPUs_features_force_on, VM.set_VCPUs_features_force_off,
VM.set_otherConfig.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMake VM.VCPUs.number a writable field.
Ewan Mellor [Wed, 6 Dec 2006 16:26:53 +0000 (16:26 +0000)]
Make VM.VCPUs.number a writable field.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded VBD.type field (CD or Disk).
Ewan Mellor [Wed, 6 Dec 2006 15:45:09 +0000 (15:45 +0000)]
Added VBD.type field (CD or Disk).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdd extra detail to the VM.destroy description.
Ewan Mellor [Wed, 6 Dec 2006 15:42:28 +0000 (15:42 +0000)]
Add extra detail to the VM.destroy description.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdd VM.auto_power_on field.
Ewan Mellor [Wed, 6 Dec 2006 15:40:26 +0000 (15:40 +0000)]
Add VM.auto_power_on field.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoClarify that memory values are in bytes.
Ewan Mellor [Wed, 6 Dec 2006 15:38:29 +0000 (15:38 +0000)]
Clarify that memory values are in bytes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoImproved task handling model.
Ewan Mellor [Wed, 6 Dec 2006 15:20:03 +0000 (15:20 +0000)]
Improved task handling model.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoTidy up the get_by_name_label description.
Ewan Mellor [Wed, 6 Dec 2006 15:13:33 +0000 (15:13 +0000)]
Tidy up the get_by_name_label description.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoClarify that the self parameter is an object reference, not the instance (i.e.
Ewan Mellor [Wed, 6 Dec 2006 15:05:23 +0000 (15:05 +0000)]
Clarify that the self parameter is an object reference, not the instance (i.e.
record) itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoTidy up the get_record and get_by_uuid descriptions.
Ewan Mellor [Wed, 6 Dec 2006 15:01:08 +0000 (15:01 +0000)]
Tidy up the get_record and get_by_uuid descriptions.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMore description tidyups -- constructors and destructors this time.
Ewan Mellor [Wed, 6 Dec 2006 13:28:37 +0000 (13:28 +0000)]
More description tidyups -- constructors and destructors this time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoTidy-up some of the descriptions.
Ewan Mellor [Wed, 6 Dec 2006 13:24:28 +0000 (13:24 +0000)]
Tidy-up some of the descriptions.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[XEN] remove unused monitor_vtable mapping.
Tim Deegan [Wed, 6 Dec 2006 12:13:22 +0000 (12:13 +0000)]
[XEN] remove unused monitor_vtable mapping.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years agoAdded Xen-API implementations for xm pause, xm unpause, xm destroy, xm rename,
Ewan Mellor [Wed, 6 Dec 2006 11:25:51 +0000 (11:25 +0000)]
Added Xen-API implementations for xm pause, xm unpause, xm destroy, xm rename,
and fix xm suspend and xm delete.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoImplement VM.set_name_label.
Ewan Mellor [Wed, 6 Dec 2006 11:24:37 +0000 (11:24 +0000)]
Implement VM.set_name_label.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded support for configuration file for xm, and use that to specify
Ewan Mellor [Wed, 6 Dec 2006 11:02:32 +0000 (11:02 +0000)]
Added support for configuration file for xm, and use that to specify
contact and authentication details for the Xen-API server.

The default behaviour is still to use the existing legacy XML-RPC server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded server proxy and session manager for Xen-API clients.
Ewan Mellor [Wed, 6 Dec 2006 10:47:31 +0000 (10:47 +0000)]
Added server proxy and session manager for Xen-API clients.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFix server reloading when the HTTP server is enabled.
Ewan Mellor [Wed, 6 Dec 2006 10:37:10 +0000 (10:37 +0000)]
Fix server reloading when the HTTP server is enabled.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoDon't trace inside SrvServer.py -- it's doing a one-second sleep in a loop, so
Ewan Mellor [Wed, 6 Dec 2006 10:13:46 +0000 (10:13 +0000)]
Don't trace inside SrvServer.py -- it's doing a one-second sleep in a loop, so
it just fills the trace with useless clutter.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMove the actual call routed by do_legacy_api_with_uuid out of the scope of
Ewan Mellor [Wed, 6 Dec 2006 10:12:39 +0000 (10:12 +0000)]
Move the actual call routed by do_legacy_api_with_uuid out of the scope of
the domains_lock.  The call itself is already locking as necessary, and it
is important for domain_start to be able to release the lock across the scope
of waitForDevices.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFix HTTP server.
Ewan Mellor [Wed, 6 Dec 2006 10:10:06 +0000 (10:10 +0000)]
Fix HTTP server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFix error message.
Ewan Mellor [Tue, 5 Dec 2006 15:47:43 +0000 (15:47 +0000)]
Fix error message.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFixes a mistake in changeset 12732
Tim Deegan [Wed, 6 Dec 2006 10:05:41 +0000 (10:05 +0000)]
Fixes a mistake in changeset 12732
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
19 years ago[LINUX] The crash note resource should be nested inside the hypervisor
Ian Campbell [Tue, 5 Dec 2006 17:01:34 +0000 (17:01 +0000)]
[LINUX] The crash note resource should be nested inside the hypervisor
resource.

This was exposed by 12709:98413fa7826c which corrected the length of
the hypervisor resource.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years ago[XEN] sh_gfn_to_mfn_foreign() must handle guest pfns above 4GB on PAE
Tim Deegan [Tue, 5 Dec 2006 12:42:29 +0000 (12:42 +0000)]
[XEN] sh_gfn_to_mfn_foreign() must handle guest pfns above 4GB on PAE
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
19 years agoThis adds a recently added parameter to the vm.start call.
Ewan Mellor [Mon, 4 Dec 2006 19:13:55 +0000 (19:13 +0000)]
This adds a recently added parameter to the vm.start call.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoTidy.
Ewan Mellor [Mon, 4 Dec 2006 18:05:32 +0000 (18:05 +0000)]
Tidy.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoFix numpad handling in QEMU's VNC server. The keymaps that we have include
Ewan Mellor [Mon, 4 Dec 2006 17:52:33 +0000 (17:52 +0000)]
Fix numpad handling in QEMU's VNC server.  The keymaps that we have include
information on which keys change depending upon the numlock setting, but
this isn't being used.  By forcing numlock on and off as necessary, when
receiving these keysyms through the VNC connection, we ensure that the
server's numlock status is the same as the client's.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoClose the server when instructed, so that we can reload on the same port, and
Ewan Mellor [Mon, 4 Dec 2006 13:57:18 +0000 (13:57 +0000)]
Close the server when instructed, so that we can reload on the same port, and
diagnose a server that fails to start.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoDiagnose a failing server, rather than just locking up the whole daemon.
Ewan Mellor [Mon, 4 Dec 2006 13:56:27 +0000 (13:56 +0000)]
Diagnose a failing server, rather than just locking up the whole daemon.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded rudimentary "xend reload" functionality. This allows you to reconfigure
Ewan Mellor [Mon, 4 Dec 2006 13:37:53 +0000 (13:37 +0000)]
Added rudimentary "xend reload" functionality.  This allows you to reconfigure
the services offered by Xend, without restarting the daemon itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoTidy error message.
Ewan Mellor [Mon, 4 Dec 2006 10:27:23 +0000 (10:27 +0000)]
Tidy error message.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMore capitalisation fixes.
Ewan Mellor [Mon, 4 Dec 2006 10:24:54 +0000 (10:24 +0000)]
More capitalisation fixes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoWith PERMISSIVE turned on, diagnose missing Enums and Bools, and improve the
Ewan Mellor [Mon, 4 Dec 2006 10:20:56 +0000 (10:20 +0000)]
With PERMISSIVE turned on, diagnose missing Enums and Bools, and improve the
diagnosis of missing structure values.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[QEMU] Error reporting in IDE device model.
kfraser@localhost.localdomain [Mon, 4 Dec 2006 09:29:26 +0000 (09:29 +0000)]
[QEMU] Error reporting in IDE device model.

Following on from my patch to make blktap report I/O errors back to
guest OS, a similar problem exists in the QEMU codebase. The IDE
driver never reports I/O errors during read/write operations back to
the guest OS. Instead all I/O operations are reported as
succesfull. If, for example, the host FS holding the disk image fills
up, then writes may fail due to lack of space. Since the guest OS
never sees these failures, it assumes all is well & will continue
writing. Eventually this can lead to severe & unrecoverable filesystem
corruption.

The attached patch fixes QEMU ide driver such that any failure of a
read or write operation sets the appropriate IDE status/error
registers. Having read the ATA-6 spec I think the most compliant
behaviour is to set the status register to 'READY_STAT | ERR_STAT',
and the error register to ABRT_ERR. There is already a convenience
function ide_abort_command() in the QEMU codebase which does just
this, so the attached patch simply calls that function.

With this patch the guest OS sees the I/O failure & the kernel logs
IDE errors and then retries the operation. This at least ensures that
the guest can be shutdown the out of space issue in the host corrected
and the guest restarted, without any serious filesystem damage having
occurred.

From: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAdd XEN_FRAMEBUFFER to -xen defconfigs.
kfraser@localhost.localdomain [Mon, 4 Dec 2006 09:21:10 +0000 (09:21 +0000)]
Add XEN_FRAMEBUFFER to -xen defconfigs.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
19 years agoRemove useless segments push/pop in VMXAssist.
kfraser@localhost.localdomain [Mon, 4 Dec 2006 09:20:12 +0000 (09:20 +0000)]
Remove useless segments push/pop in VMXAssist.
According to Intel Spec, segments registors are cleared when exiting
virtual-8086 mode through trap or interrupts gate, so it's no need to
save their values in stack.
Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[PATCH 02/02] Kexec / Kdump: Don't declare _end
Ian Campbell [Mon, 4 Dec 2006 09:08:47 +0000 (09:08 +0000)]
[PATCH 02/02] Kexec / Kdump: Don't declare _end

_end is already declared in xen/include/asm/config.h, so don't declare
it twice. This solves a powerpc/ia64 build problem where _end is declared
as char _end[] compared to unsigned long _end on x86.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
19 years ago[PATCH 01/02] Kexec / Kdump: Use NOTE_ALIGN() instead of ALIGN()
Ian Campbell [Mon, 4 Dec 2006 09:08:47 +0000 (09:08 +0000)]
[PATCH 01/02] Kexec / Kdump: Use NOTE_ALIGN() instead of ALIGN()

ALIGN() is already defined in xen/include/asm-ia64/config.h. This patch
renames ALIGN() to NOTE_ALIGN() to make the kexec code build on ia64.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
19 years ago[XEN] Fix 32-bit build.
kaf24@firebug.cl.cam.ac.uk [Sun, 3 Dec 2006 17:44:14 +0000 (17:44 +0000)]
[XEN] Fix 32-bit build.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Add 'insn_fetch' memory operation to the x86_emulator.
kaf24@localhost.localdomain [Sun, 3 Dec 2006 17:15:48 +0000 (17:15 +0000)]
[XEN] Add 'insn_fetch' memory operation to the x86_emulator.

This can be used to perform correct access checks, provide appropriate
error codes when injecting faults, and to implement an
instruction-stream prefetch cache (which is included here for HVM PTE
update emulations).

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoRevert the change to destroy all VMs when skipping or failing tests -- this
Ewan Mellor [Sun, 3 Dec 2006 13:30:23 +0000 (13:30 +0000)]
Revert the change to destroy all VMs when skipping or failing tests -- this
needs more thought, because people shouldn't need to set up their Xen-API server
to run the non-Xen-API bits of the test, and at the moment, you get
authentication failures on every SKIP.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMake the xenfb tools an optional part of the build, as they introduce new
Ewan Mellor [Sat, 2 Dec 2006 16:39:53 +0000 (16:39 +0000)]
Make the xenfb tools an optional part of the build, as they introduce new
dependencies (libvncserver and libsdl devel packages).  Enable them with
XENFB_TOOLS=y.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[XEND] Fix mis-types in XendConfig
Alastair Tse [Fri, 1 Dec 2006 18:35:19 +0000 (18:35 +0000)]
[XEND] Fix mis-types in XendConfig

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years agoMerge
Alastair Tse [Fri, 1 Dec 2006 18:33:11 +0000 (18:33 +0000)]
Merge

19 years agoMerge
Alastair Tse [Fri, 1 Dec 2006 17:43:18 +0000 (17:43 +0000)]
Merge

19 years agoMerge
Alastair Tse [Fri, 1 Dec 2006 17:42:39 +0000 (17:42 +0000)]
Merge

19 years agoUse the new xen-api.sock for the calls to the Xen-API server.
Ewan Mellor [Fri, 1 Dec 2006 17:40:07 +0000 (17:40 +0000)]
Use the new xen-api.sock for the calls to the Xen-API server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[XEND] Re-add vtpm device support in XendConfig
Alastair Tse [Fri, 1 Dec 2006 17:37:42 +0000 (17:37 +0000)]
[XEND] Re-add vtpm device support in XendConfig

This patch re-adds a recently removed vTPM device handling code.
I am also removing that one code part in the test script that does not
work.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoThis patch provides XmTestManagedDomain and XenManagedDomain classes
Ewan Mellor [Fri, 1 Dec 2006 17:37:09 +0000 (17:37 +0000)]
This patch provides XmTestManagedDomain and XenManagedDomain classes
similar to the XmTestDomain and XenDomain classes. I have wrapped the
xen-api for VM configuration creation, starting and stopping of VMs and
destruction of the VM configuration in the XenManagedDomain class's
methods. No device-related functions are provided through the class.

The managed domains' UUIDs are tracked and all created VMs are destroyed
upon failure or skipping of the test or by calling
xapi.vm_destroy_all().

I am adding a new grouptest 'xapi' for running xen-api tests.

Only caveat: I am using an empty username and password
(XmTestList/xapi.py) with Xend's authentication deactivated to run these
tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
19 years agoMerge
Alastair Tse [Fri, 1 Dec 2006 17:31:50 +0000 (17:31 +0000)]
Merge

19 years ago[XENAPI] Add extra param for VM.start and fix case for printing out
Alastair Tse [Fri, 1 Dec 2006 17:31:30 +0000 (17:31 +0000)]
[XENAPI] Add extra param for VM.start and fix case for printing out
the output of VM.get_record.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Proper importing of Xen API VM Struct into new XendConfig
Alastair Tse [Fri, 1 Dec 2006 17:30:39 +0000 (17:30 +0000)]
[XEND] Proper importing of Xen API VM Struct into new XendConfig

Use a smarter method of importing the Xen API VM struct when adding to
XendConfig.

Also add a commented __setitem__ override for XendConfig to type check
certain configuration values.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEN] Allow shutdown code to be set at most once per domain.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 17:29:04 +0000 (17:29 +0000)]
[XEN] Allow shutdown code to be set at most once per domain.
SIgned-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEND] Fix case mismatch in VM.get_record for Xen API
Alastair Tse [Fri, 1 Dec 2006 17:21:19 +0000 (17:21 +0000)]
[XEND] Fix case mismatch in VM.get_record for Xen API

Also make VM.get_all return halted domains too.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years agoFix a number of flaws in the blktap userspace daemon when dealing
Andrew Warfield [Fri, 1 Dec 2006 17:01:04 +0000 (09:01 -0800)]
Fix a number of flaws in the blktap userspace daemon when dealing
with I/O errors.

There are a number of flaws in the blktap userspace daemon when dealing
with I/O errors.

 - The backends which use AIO check the io_events.res member to determine
  if an I/O error occurred. Which is good. But when calling the callback
  to signal completion of the I/O, they pass the io_events.res2 member

  Now this seems fine at first glance[1]

    "res is the usual result of an I/O operation: the number of bytes
     transfered, or a negative error code. res2 is a second status
     value which will be returned to the user"

  Except that

     "currently (2.6.0-test9), callers of aio_complete() within the
      kernel always set res2 to zero."

  And this hasn't changed anytime since 2.6.0, so by passing through
  the status from 'res2', the callback thinks the I/O operation succeeded
  even when it failed :-(

  The fix is simple instead of passing 'res2', just pass

     ep->res == io->u.c.nbytes ? 0 : 1

  This would solve the error reporting to the guest, except that there
  is a second flaw...

 - The tapdisk I/O completion callback checks the status parameter
  passed in, syslog's it and then returns. It never bothers to send
  the I/O completion response back to the blktap kernel driver when
  a failure occurrs.

  Fortunately the fix for this is also simple. Instead of returning
  from the callback when dealing with an error, we simply toggle the
  status field for the pending response to BLKIF_RSP_ERROR and then
  continue with the normal codepath. So the error eventually gets
  back to the guest.

The scenario I used to discover the problem and test the patch is thus:

 - In dom0  create a filesystem with only 200 MB of free space
 - Create a 1 GB sparse file on this volume.
 - Configure the guest so this sparse file appears as /dev/xvdb
 - In the domU create a single partition on /dev/xvdb and format
  it with ext3.
 - In the DomU, mount /dev/xvdb1 on /mnt and then run

     dd if=/dev/zero of=/mnt/data.bin bs=1GB count=1

Without this patch, the 'dd' command would succeed in writing 1 GB of data
even though the underlying disk in Dom0 was only 200 MB in size. More complex
tests of copying a whole directory heirarchy across resulted in catastrophic
data corruption of the filessytem itself. Manual fsck was needed to fixup
the filesystem & there were many very bad errors needing fixing.

With this patch applied the DomU sees the I/O failures and kernel  logs
messages

Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 722127
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 730327
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 738527
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 746727
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 754927
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 763127
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 771327
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 779527
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 792399

It will retry the I/O operation until it runs out of sectors to try, and then
fail the operation. The filesystem is not seriously damaged - ext3 journal
recovery will trivially cleanup if the guest is rebooted after the disk in
Dom0 is enlarged.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
[1] http://lwn.net/Articles/24366/

19 years ago[XEND] Fix outputting device SXPs when domain is halted.
Alastair Tse [Fri, 1 Dec 2006 16:31:36 +0000 (16:31 +0000)]
[XEND] Fix outputting device SXPs when domain is halted.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[HVM] Cache segment-register contents during PTE-update emulations.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 15:45:59 +0000 (15:45 +0000)]
[HVM] Cache segment-register contents during PTE-update emulations.
Also clean up page-fault propagation to inject the correct error
code and CR2 value.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[TOOLS] Checks for libvncserver-dev and libsdl-dev.
Alastair Tse [Fri, 1 Dec 2006 15:12:48 +0000 (15:12 +0000)]
[TOOLS] Checks for libvncserver-dev and libsdl-dev.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Fix missing vncpasswd option for HVM domains.
Alastair Tse [Fri, 1 Dec 2006 14:35:33 +0000 (14:35 +0000)]
[XEND] Fix missing vncpasswd option for HVM domains.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years agoUpdate hgignore list.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 14:30:42 +0000 (14:30 +0000)]
Update hgignore list.

19 years ago[XEN] Remove uses of 'extern inline'.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 14:29:32 +0000 (14:29 +0000)]
[XEN] Remove uses of 'extern inline'.

Original patch by Christoph Egger at AMD.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
kfraser@localhost.localdomain [Fri, 1 Dec 2006 14:25:36 +0000 (14:25 +0000)]
[LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
Add a comment clarifying how this function differs from
xc_evtchn_alloc_unbound().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Emulate XADD instruction.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 13:57:46 +0000 (13:57 +0000)]
[XEN] Emulate XADD instruction.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEND] Reapply fix for ever expanding kernel_args in XendConfig
Alastair Tse [Fri, 1 Dec 2006 13:55:28 +0000 (13:55 +0000)]
[XEND] Reapply fix for ever expanding kernel_args in XendConfig

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[XEND] Ensure config value types in XendConfig
Alastair Tse [Fri, 1 Dec 2006 13:53:04 +0000 (13:53 +0000)]
[XEND] Ensure config value types in XendConfig

Add definitions of what we expect the types to be for the values in
XendConfig and apply them when parsing SXP where all values are either
strings or list.

Also fix missing stdvga in HVM config.

Signed-off-by: Alastair Tse <atse@xensource.com>
19 years ago[LINUX] dev/mem: Rename Xen's mmap_mem to xen_mmap_mem to
kfraser@localhost.localdomain [Fri, 1 Dec 2006 13:44:33 +0000 (13:44 +0000)]
[LINUX] dev/mem: Rename Xen's mmap_mem to xen_mmap_mem to
avoid conflict with the definition (which still exists and
is used) in drivers/char/mem.c.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoActually return something from bool0.
Ewan Mellor [Fri, 1 Dec 2006 13:25:33 +0000 (13:25 +0000)]
Actually return something from bool0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoUpdate README to reflect moved library.
Ewan Mellor [Fri, 1 Dec 2006 13:09:30 +0000 (13:09 +0000)]
Update README to reflect moved library.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMerge.
Steven Smith [Fri, 1 Dec 2006 13:12:41 +0000 (13:12 +0000)]
Merge.

19 years ago[PVFB][TOOLS] Don't unwatch the framebuffer frontend's state node just
Steven Smith [Fri, 1 Dec 2006 13:11:53 +0000 (13:11 +0000)]
[PVFB][TOOLS] Don't unwatch the framebuffer frontend's state node just
because it want to state Closed.  Otherwise, we don't notice when
the node gets deleted, and can't reliably shut the backend down.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years agoSet localtime, enable_audio, clock_offset, and std_vga back to being bools, not
Ewan Mellor [Fri, 1 Dec 2006 13:08:36 +0000 (13:08 +0000)]
Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not
ints.  This is a recent breakage.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded log message for when a VM is deleted.
Ewan Mellor [Fri, 1 Dec 2006 13:07:19 +0000 (13:07 +0000)]
Added log message for when a VM is deleted.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoInclude the rotated xend.log.X in the bug report.
Ewan Mellor [Fri, 1 Dec 2006 13:06:15 +0000 (13:06 +0000)]
Include the rotated xend.log.X in the bug report.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[PVFB][TOOLS] Fix save/restore for domains with PV framebuffers.
Steven Smith [Fri, 1 Dec 2006 12:38:41 +0000 (12:38 +0000)]
[PVFB][TOOLS] Fix save/restore for domains with PV framebuffers.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years agoLink test/test_bindings against libxenapi in the new location.
Ewan Mellor [Fri, 1 Dec 2006 12:24:42 +0000 (12:24 +0000)]
Link test/test_bindings against libxenapi in the new location.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[TOOLS][PVFB] Avoid zombie framebuffer backends.
Steven Smith [Fri, 1 Dec 2006 12:20:12 +0000 (12:20 +0000)]
[TOOLS][PVFB] Avoid zombie framebuffer backends.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[TOOLS] Remove some dead code.
Steven Smith [Fri, 1 Dec 2006 12:09:10 +0000 (12:09 +0000)]
[TOOLS] Remove some dead code.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years agoMerge.
Steven Smith [Fri, 1 Dec 2006 12:03:38 +0000 (12:03 +0000)]
Merge.

19 years ago[PVFB] Make sure that framebuffer backend goes away when the domain
Steven Smith [Fri, 1 Dec 2006 12:03:15 +0000 (12:03 +0000)]
[PVFB] Make sure that framebuffer backend goes away when the domain
terminates, and that it cleans up its area of xenstore.

Tidy up argument parsing a little while I'm here.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[XEN] Quieten down HVM debug output.
kfraser@localhost.localdomain [Fri, 1 Dec 2006 11:54:53 +0000 (11:54 +0000)]
[XEN] Quieten down HVM debug output.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] The removal of the console_use_vt hack was premature: it's still
Steven Smith [Fri, 1 Dec 2006 11:52:33 +0000 (11:52 +0000)]
[LINUX] The removal of the console_use_vt hack was premature: it's still
required if CONFIG_VT is enabled but the domain isn't currently
configured to use the PV framebuffer.  Put it back in, in a slightly
more palatable form.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years ago[PVFB][TOOLS] Change the configuration syntax for PVFB backends to more
Steven Smith [Fri, 1 Dec 2006 11:49:30 +0000 (11:49 +0000)]
[PVFB][TOOLS] Change the configuration syntax for PVFB backends to more
closely match that of other devices.

This involves moving the logic for backend creation out of the image
handlers and in to the device handler, which is a much more sensible
place for it.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
19 years agoTidy up the creation of directories that Xend needs. This avoids potential
Ewan Mellor [Fri, 1 Dec 2006 11:32:32 +0000 (11:32 +0000)]
Tidy up the creation of directories that Xend needs.  This avoids potential
races in this creation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agomerge
Alastair Tse [Fri, 1 Dec 2006 11:08:34 +0000 (11:08 +0000)]
merge

19 years ago[XEND] More fixes for HVM device configuration parsing
Alastair Tse [Fri, 1 Dec 2006 11:07:22 +0000 (11:07 +0000)]
[XEND] More fixes for HVM device configuration parsing

Removed duplicated acpi option, added missing stdvga option. Do not
output empty configurations in image sxp. Remove bug with vcpus
passing in device model.

Signed-off-by: Alastair Tse <atse@xensource.com>